
import ok

xem = ok.FrontPanel()
if (xem.OpenBySerial('') != 0):
    raise RuntimeError, 'Failed to open USB connection.'

PLL = ok.PLL22150()
xem.GetPLL22150Configuration(PLL)
PLL.SetVCOParameters(333,48)
PLL.SetOutputSource(0,2)
PLL.SetOutputEnable(0,2)
#PLL.SetDiv1(1,10)
xem.SetPLL22150Configuration(PLL)
import datetime

if (xem.ConfigureFPGA(r'../SynthesisSerializerTestbed/SerializerTestbed.bit') != 0):
    raise RuntimeError, 'Failed to upload bit file to fpga.'

xem.SetWireInValue(0x00, int('10001001',2))
xem.UpdateWireIns()
